general.js ➔ isEmpty   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 11
rs 9.95
c 0
b 0
f 0
cc 1
1
'use strict';
2
3
function isEmpty(x) {
4
  return (
5
    typeof x === 'undefined' ||
6
    x === null ||
7
    x === 'null' ||
8
    x === 'undefined' ||
9
    x === false ||
10
    x.length === 0 ||
11
    x === ''
12
  );
13
}
14
15
module.exports = {
16
  isEmpty: isEmpty,
17
};
18